//
//  InspectionDetailCell.m
//  PropertyMananger
//
//  Created by Mansion on 17/1/21.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "InspectionDetailCell.h"

@implementation InspectionDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *cellID = @"InspectionDetailCellID";
    InspectionDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if(cell == nil) {
        cell = [[InspectionDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    //选中cell的颜色 -无色
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return cell;
    
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        self.titleLabel.textColor = BHColor(102, 102, 102);
        
        self.titleLabel.font = BHFont(15);
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(80, 25));
        }];
        
        self.contentLabel  = [[UILabel alloc]init];
        [self.contentView addSubview:self.contentLabel];
        self.contentLabel.font = BHFont(15);
        
        self.contentLabel.textAlignment = NSTextAlignmentLeft;
        self.contentLabel.textColor = BHColor(51, 51, 51);
        
        [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.titleLabel.mas_trailing).with.offset(0);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW/2, 25));
        }];
    }
    return self;
}
@end
